package com.sinosoft.tcmcp.system.web.dto;

import com.sinosoft.framework.core.api.domain.ApplicationEntity;
import com.sinosoft.framework.core.common.utils.ajax.ObjectUtil;

/**
 * 应用信息传输类
 * @author xiaoxiong
 *
 */
public class ApplicationData implements java.io.Serializable {

	private static final long serialVersionUID = 1L;

	private String id;	// 应用编号
	private String cid;	//	应用类别
	private String name;	//	名称
	private String cname;	//	类别名称
	private String icon;	// 图标
	private String icontype;	// 图标类型
	private byte[] iconblob;	//	图标内容
	private String description; // 描述
	private int sort; // 排序
	private String readonly;  //只读
	public String getId() {
		return id;
	}
	public void setId(String id) {
		this.id = id;
	}
	public String getCid() {
		return cid;
	}
	public void setCid(String cid) {
		this.cid = cid;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getCname() {
		return cname;
	}
	public void setCname(String cname) {
		this.cname = cname;
	}
	public String getIcon() {
		return icon;
	}
	public void setIcon(String icon) {
		this.icon = icon;
	}
	public String getIcontype() {
		return icontype;
	}
	public void setIcontype(String icontype) {
		this.icontype = icontype;
	}
	public byte[] getIconblob() {
		return iconblob;
	}
	public void setIconblob(byte[] iconblob) {
		this.iconblob = iconblob;
	}
	public String getDescription() {
		return description;
	}
	public void setDescription(String description) {
		this.description = description;
	}
	public int getSort() {
		return sort;
	}
	public void setSort(int sort) {
		this.sort = sort;
	}
	public String getReadonly() {
		return readonly;
	}
	public void setReadonly(String readonly) {
		this.readonly = readonly;
	}

	/**
	 * 数据转换
	 * 实体类转传输类
	 * @param applicationEntity 资源实体数据
	 */
	public void toApplicationData(ApplicationEntity applicationEntity) {
		ObjectUtil.oldToNew(this, applicationEntity, "serialVersionUID");
	}
	
	/**
	 * 数据转换
	 * 传输类转实体类
	 * @return	应用实体信息
	 */
	public ApplicationEntity toApplicationEntity() {
		ApplicationEntity applicationEntity = new ApplicationEntity();
		ObjectUtil.oldToNew(applicationEntity, this, "serialVersionUID");
		return applicationEntity;
	}
}
